package org.thingsboard.server.dao.custom;

import com.google.common.util.concurrent.ListenableFuture;
import org.thingsboard.server.common.data.custom.DeviceGroup;
import org.thingsboard.server.common.data.id.TenantId;
import org.thingsboard.server.common.data.id.custom.DeviceGroupId;

public interface DeviceGroupService {

    /**
     * @author miki
     * @desc 创建或更新分组
     * @param deviceGroup
     * @return
     */
    DeviceGroup createOrUpdateDeviceGroup(DeviceGroup deviceGroup);

    /**
     * @autor miki
     * @desc 异步查询分组信息
     * @param tenantId
     * @param groupId
     * @return
     */
    ListenableFuture<DeviceGroup> findGroupByIdAsync(TenantId tenantId, DeviceGroupId groupId);

    DeviceGroup findGroupById(TenantId tenantId, DeviceGroupId groupId);
}
